import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/vue-admin-template/table/list',
    method: 'get',
    params
  })
}


// 查询模型列表
export function ModelList(page,size,data) {
  return request({
    url: `/datac/model/query?page=${page}&size=${size}`,
    method: "post",
    data,
  });
}

// 启用关闭按钮
export function EnableDisable(data) {
  return request({
    url: "/datac/model/enable",
    method: "post",
    data,
  });
}


export function DelMoban(data) {
  return request({
    url: "/datac/model/delete",
    method: "post",
    data,
  });
}


// 查询，模型列表
export function MobanList() {
  return request({
    url: "/datac/model/query/groups",
    method: "get",
  });
}


// 添加模型
export function AddMoban(data) {
  return request({
    url: "/datac/model/add",
    method: "post",
    data,
  });
}

// 修改模型   
export function ChangeMoban(data) {
  return request({
    url: "/datac/model/update",
    method: "post",
    data,
  });
}


// 下载模版  

export function ModelDown(modelKey,data) {
  return request({
    url: `datac/model/download?modelKey=${modelKey}`,
    method: "post",
    data,
  });
}



//用户管理员上传文件   localhost:8081/datac/business/file/query?page=4&size=2
export function UserUploadfile(page,size,data) {
  return request({
    url: `/datac/business/file/query?page=${page}&size=${size}`,
    method: "post",
    data,
  });
}


// 用户上传文件   
export function UpUserFiles(data) {
  return request({
    url: "/datac/business/file/upload",
    method: "post",
    data,
  });
}

// 用户上传模型  
export function QueryModelkey(data) {
  return request({
    url: "/datac/user-model/query",
    method: "post",
    data,
  });
}


// 管理上传
export function AdminUserFiles(data) {
  return request({
    url: "/datac/business/file/upload",
    method: "post",
    data,
  });
}


// 模型列表
export function MoXingConList(data) {
  return request({
    url: "/datac/user-model/query",
    method: "post",
    data,
  });
}

// 添加模型  
export function AddMoXing(data) {
  return request({
    url: "/datac/user-model/add",
    method: "post",
    data,
  });
}


// 启动禁用模型  
export function QiDisableMx(data) {
  return request({
    url: "/datac/user-model/enable",
    method: "post",
    data,
  });
}

//删除模型  
export function DelMoXing(data) {
  return request({
    url: "/datac/user-model/delete",
    method: "post",
    data,
  });
}


//   查看用户未配置的模版（用于管理员给用户新增）
export function NoMoXingConfig(data) {
  return request({
    url: "/datac/user-model/queryNo",
    method: "post",
    data,
  });
}